import {
  Button,
  Image,
  Lazyload,
  Popup,
  Swipe,
  SwipeItem,
  Cell,
  Grid,
  GridItem,
} from 'vant';

function install(app) {
  const components = [
    Button,
    Image,
    Lazyload,
    Popup,
    Swipe,
    SwipeItem,
    Cell,
    Grid,
    GridItem,
  ];
  components.forEach(function (item) {
    if (item.install) {
      app.use(item);
    } else if (item.name) {
      app.component(item.name, item);
    }
  });
}
export default {
  install: install,
};
